package com.shanghaionstar.notification.service;

import android.app.Activity;
import android.content.Context;
import android.telephony.TelephonyManager;

import com.onstar.cn.common.util.DeviceUtil;
import com.shanghaionstar.notification.bean.NotificationConstants;

import java.io.Serializable;


public class RequestParams implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String host;
	private Integer port;
	private String deviceId;
	private String appScrcet;
	private String deviceToken;
	private int noity_icon;
	private String appName;
	private Activity jumpActivity;
	private boolean autoRetry = false;

	public boolean isAutoRetry() {
		return autoRetry;
	}

	public void setAutoRetry(boolean autoRetry) {
		this.autoRetry = autoRetry;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public String getAppScrcet() {
		return appScrcet;
	}

	public void setAppScrcet(String appScrcet) {
		this.appScrcet = appScrcet;
	}

	public String getDeviceToken() {
		return deviceToken;
	}

	public void setDeviceToken(String deviceToken) {
		this.deviceToken = deviceToken;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public int getNoity_icon() {
		return noity_icon;
	}

	public void setNoity_icon(int noity_icon) {
		this.noity_icon = noity_icon;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public Activity getJumpActivity() {
		return jumpActivity;
	}

	public void setJumpActivity(Activity jumpActivity) {
		this.jumpActivity = jumpActivity;
	}

	public static RequestParams getDefaultParams(Context context) {
		RequestParams params = new RequestParams();
		String deviceId = new DeviceUtil(context).getDeviceID();
		params = new RequestParams();
		params.setDeviceId(deviceId);
		params.setDeviceToken(deviceId);
		params.setHost(NotificationConstants.HOST);
		params.setPort(NotificationConstants.PORT);
		String appScret = new DeviceUtil(context).getAppVersion();
		params.setAppScrcet(appScret);
		params.setAutoRetry(NotificationConstants.AUTO_RETRY);
		return params;
	}
}
